<%@ include file="/jsp/include.jsp" %>
<%
String redirect = ParamUtil.getString(request, "redirect");

CategorySearch searchContainer = (CategorySearch)request.getAttribute("liferay-ui:search:searchContainer");
CategoryDisplayTerms displayTerms = (CategoryDisplayTerms)searchContainer.getDisplayTerms();
%>
<aui:input label="Category.Name" name='<%= displayTerms.NAME %>' size='30' value='<%= displayTerms.getName() != null ? displayTerms.getName() : "" %>' />
<aui:button-row>
	<aui:button type="submit" value="Command.Search" /> 
		<%
		String taglibOnClick = "location.href = '" + HtmlUtil.escape(redirect) + "';";
		%>
	<aui:button type="button" value="Command.Cancel"  onClick="<%= taglibOnClick %>" />
</aui:button-row>

<c:if test="<%= windowState.equals(WindowState.MAXIMIZED) %>">
	<aui:script>
		Liferay.Util.focusFormField(document.viewCategoryForm.<portlet:namespace /><%= displayTerms.NAME %>);
	</aui:script>
</c:if>